﻿using EasyBuyShop.Models;
using EasyBuyShop.Utils;

namespace EasyBuyShop.DAL
{
    public class UserDal:BaseDal
    {
        public List<User> QueryUserList()
        {
            return null;
        }

        public User GetUser(string userName,string password)
        {
            try
            {
                return this.GetDb(ConnStr).Queryable<User>().First(r=>r.UserName==userName && r.Password==password);
            }
            catch (Exception ex)
            {
                LogHelper.Fatal(ex.Message);
                return null;
            }
        }
    }
}
